The AlarmManager
class provides access to the system alarm services. It allows you to schedule your application to run at some point
in the future, even when it’s not active.
From API 19 onwards, the alarm delivery is inexact in order to save battery life. The Android OS now batches together alarms from all apps that
occur at reasonably similar times so the system wakes the device once instead of several times to handle each alarm.
It is possible to use exact alarms with setExact
, setExactAndAllowWhileIdle
, setWindow
and
setAlarmClock
. Exact alarms should be used only when strict delivery guarantees are required, for example for an alarm clock application
or for calendar notifications.
The rule raises an issue when an exact alarm is set, or when a window is set to less than 10 minutes.